<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<style>
			
			table,tr,td{
				border: 1px solid black;
				border-collapse: collapse;
			}
			
		</style>
	</head>
	<body>
		
		<script>
			
			// 1.数组
			var arr1 = new Array();
			console.log(arr1.length);
			
			arr1[0] = "张三";
			arr1[1] = "王五";
			arr1[2] = 1;
			console.log(arr1);
			console.log(arr1.length);
			
			var arr2 = new Array();
			console.log(arr2[0]);
			
			var arr3 = new Array(10,20,30,40);
			console.log(arr3[0]);
			
			var arr4 = ["a","b","c"];
			console.log(arr4);
			
			var stu5 = [
				[1,2,3],
				[4,5,6],
				[7,8,9]
			];
			
			var stus = [
				{id:1,name:"张三",age:18},
				{id:2,name:"李四",age:19},
				{id:3,name:"王五",age:20}
			];
			console.log(stus);
			
			document.write("<table>");
			document.write("<tr>");
			document.write("<td>");
			document.write("学号");
			document.write("</td>");
			document.write("<td>");
			document.write("姓名");
			document.write("</td>");
			document.write("<td>");
			document.write("年龄");
			document.write("</td>");
			document.write("</tr>");
			for(var i in stus){
				var stu = stus[i];
				document.write("<tr>");
				document.write("<td>");
				document.write(stu.id);
				document.write("</td>");
				document.write("<td>");
				document.write(stu.name);
				document.write("</td>");
				document.write("<td>");
				document.write(stu.age);
				document.write("</td>");
				document.write("</tr>");
			}
			
			
			
			
			
			
			
			
			
			
			
			
			// 练习：
			// 定义一个数组存放一些国家的名字
			
			var countries = [
				"中国","日本","韩国","美国","英国","德国","俄罗斯"
			];
			
			
		</script>
		
		
		
	</body>
</html>